libxenctrl: xc_destroy_domain() handles EAGAIN.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 31 Aug 2007 14:43:28 +0000 (15:43 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 31 Aug 2007 14:43:28 +0000 (15:43 +0100)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
tools/libxc/xc_domain.c

index 4c02079b6de004494323ecb291ca373997ae586e..fdb87f0bd1279eb43dd883377871f42c2ba717a0 100644 (file)
@@ -55,10 +55,14 @@ int xc_domain_unpause(int xc_handle,
 int xc_domain_destroy(int xc_handle,
                       uint32_t domid)
 {
+    int ret;
     DECLARE_DOMCTL;
     domctl.cmd = XEN_DOMCTL_destroydomain;
     domctl.domain = (domid_t)domid;
-    return do_domctl(xc_handle, &domctl);
+    do {
+        ret = do_domctl(xc_handle, &domctl);
+    } while ( ret && (errno == EAGAIN) );
+    return ret;
 }
 
 int xc_domain_shutdown(int xc_handle,